<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <title>新增文章</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">    
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">
	<!--css,js-->
	<script type="text/javascript" src="<c:url value='/resources/js/jquery-1.10.2.js'/>"></script>
  </head>
  <style>
  </style>
  <body>
   <div class="a_box">
	   <form id="articleForm">
	   		<input name="title" />
	   		<textarea name="content" cols="20" rows="5"></textarea>
	   		<input name="state" />
	   		<input name="userid" />
	   		<input name="username" />
	   		<input name="createtime" />
	   		<input type="submit" class="submit" value="保存"/>
	   	</form>
   </div>
   <script type="text/javascript">
   	$(function(){
   		$(".submit").on("click",function(){
	   		$("#articleForm").ajaxSubmit({
	   			url:"<c:url value='/rest/article.add'/>",
	   			type:"GET",
	   			data:$("#articleForm").serialize(),
	   			success:function(e){
	   				console.log("e="+e);
	   			}
	   		});
   		});
   	});
   </script>
  </body>
</html>
